/***************************************************************************
 *            fosfor_tracker.h
 *
 *  Thu Oct 15 16:06:12 2009
 *  Copyright  2009  Kevin DeKorte
 *  <kdekorte@gmail.com>
 ****************************************************************************/
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA
 */
 
#include <glib-object.h>
#include <gtk/gtk.h>
#include <clutter/clutter.h>
#include "declarations.h"

#ifndef __FOSFOR_TRACKER_H__
#define __FOSFOR_TRACKER_H__

G_BEGIN_DECLS
#define FOSFOR_TYPE_TRACKER		(fosfor_tracker_get_type ())
#define FOSFOR_TRACKER(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), FOSFOR_TYPE_TRACKER, FosforTracker))
#define FOSFOR_TRACKER_CLASS(obj)	(G_TYPE_CHECK_CLASS_CAST ((obj), FOSFOR_TRACKER, FosforTrackerClass))
#define FOSFOR_IS_TRACKER(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOSFOR_TYPE_TRACKER))
#define FOSFOR_IS_TRACKER_CLASS(obj)	(G_TYPE_CHECK_CLASS_TYPE ((obj), FOSFOR_TYPE_TRACKER))
#define FOSFOR_TRACKER_GET_CLASS	(G_TYPE_INSTANCE_GET_CLASS ((obj), FOSFOR_TYPE_TRACKER, FosforTrackerClass))
typedef struct _FosforTracker FosforTracker;
typedef struct _FosforTrackerClass FosforTrackerClass;

struct _FosforTracker {
    ClutterGroup parent;

	ClutterActor *progress;
	ClutterActor *background;
	ClutterActor *thumb;
	ClutterActor *status;
	ClutterActor *time_stamp;
	ClutterActor *vcontainer;
	ClutterLayoutManager *vlayout;
	ClutterActor *hcontainer;
	ClutterLayoutManager *hlayout;
	
	guint duration;
	guint position;
	gdouble percentage;
	guint width, height;
	gboolean mouse_down;
};

struct _FosforTrackerClass {
    ClutterGroupClass parent_class;
	void (* percentage_changed)  (FosforTracker *tracker);
};

GType fosfor_tracker_get_type(void);
ClutterActor *fosfor_tracker_new();
void fosfor_tracker_set_duration(FosforTracker *tracker, guint duration);
void fosfor_tracker_set_value(FosforTracker *tracker, guint value);
void fosfor_tracker_set_message(FosforTracker *tracker, const gchar *message);
gchar *gm_seconds_to_string(gfloat seconds);

G_END_DECLS
#endif
